-
Notifications
You must be signed in to change notification settings - Fork 32
feat(InfoTip): Add global escape close #3194
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
View your CI Pipeline Execution ↗ for commit d325cb8
☁️ Nx Cloud last updated this comment at |
…gamut into ajr-global-esc-close-infotip
|
📬 Published Alpha Packages: |
|
🚀 Styleguide deploy preview ready! Preview URL: https://690230c53f76e5d9a496e006--gamut-preview.netlify.app |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Works well in SB and left one tiny nit
🔥
|
|
||
| const InfoTipExample: React.FC<InfoTipProps> = (args) => { | ||
| return ( | ||
| export const Default: Story = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Love all these changes, thanks~
| // Focus is leaving the InfoTip system entirely (via Tab, arrow keys, or any navigation) | ||
| // Return it to the button to maintain logical focus order | ||
| buttonRef.current?.focus(); | ||
| } else if (relatedTarget === null) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: could this just be an else? Is there an edge case you're trying to cover here?
Overview
Adds a global escape close to floating InfoTips. Also moves focus back to info button after focus leaves the infotip.
PR Checklist
Testing Instructions
PR Links and Envs